package m.permission.controller;
import m.framework.controller.BaseController;
import m.framework.controller.Task;
import m.framework.dao.selector.PageRecord;
import m.framework.dao.selector.Query;
import m.framework.service.BaseService;
import m.permission.model.User;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;

/**
 * @author ming
 * @date 2014年2月19日下午1:47:35
 */
@Controller
public class UserController extends BaseController{
	private static Logger log = LoggerFactory.getLogger(UserController.class);
	
	@Task("新增用户")
	public void insert(User user){
		BaseService.getDefault().insert(user);
	}
	
	@Task("查询用户")
	public PageRecord query(Query<User> query){
		return BaseService.getDefault().queryPage(query, 1, DEFAULT_REWS_PERPAGE);
	}
	
}




